import { Component,ViewChild} from '@angular/core';

import { Platform, Tabs } from 'ionic-angular';
import { SportPage } from '../sport/sport';
import { UsercenterPage } from '../usercenter/usercenter';
import { HomePage } from '../home/home';

import {BackButtonService} from "../../service/backButton.service";


@Component({
  templateUrl: 'tabs.html'
})
export class TabsPage {
  @ViewChild('myTabs') tabRef: Tabs;
  tab1Root = HomePage;
  tab2Root = SportPage;
  tab3Root = UsercenterPage;
  constructor(
    public backButtonService: BackButtonService,
    private platform: Platform) {

    platform.ready().then(() => {
      this.backButtonService.registerBackButtonAction(this.tabRef);
    });
  }
}
